
import 'package:elmer_tools/common/dataBase/ColumnType.dart';

class TypeText implements ColumnType<String> {
    @override
    String name;

    @override
    bool? notNull;
    
    @override
    bool? primaryKey;
    
    @override
    bool? unique;

    @override
    String? defaultValue;

    @override
    String? comment;
    
    @override
    String get type{
        String result = "$name TEXT";
         
        if(notNull == true) {
            result += " NOT NULL";
        }
        if(primaryKey == true) {
            result += " PRIMARY KEY";
        }
        return result;
    }


    TypeText(this.name, {
        this.defaultValue,
        this.primaryKey = false,
        this.notNull = false,
        this.unique = false
    });

  
}